<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
	<title>消息发送查询</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<%@ include file="/comm.jsp"%>
<style type="text/css">
<!--
fieldset {
    padding:10px;
    margin:10px;
    width:270px;
    color:#333; 
} 
legend {
    color:#06c;
    font-weight:800; 
} 

.menubar {width:100px; cursor:hand;}
	-->
</style>

	<body>
	<s:form name ="formpage" action="email_listAll" namespace="/">
		<div align="left">
		<!-- 查询条件 -->
  		<%@ include file="/messages.jsp"%>
			<fieldset>
				<legend>
					查询条件
				</legend>
				<table align="left" width="700px" border="0">
					<tr>
						<td align="right">
							日期：</td>
						<td width="220px">
						<input id="dStartdate" name="emailDto.fromDate" 
						 	value='<s:date name="emailDto.fromDate" format="yyyy-MM-dd" />'
						 	size="13" class="Wdate" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'dEnddate\')}'})"/> 
						至<input id="dEnddate" name="emailDto.toDate" 
						 	value='<s:date name="emailDto.toDate" format="yyyy-MM-dd" />'
						 	size="13" class="Wdate" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'dStartdate\')}'})"/>
						</td>
						<td align="right">
							状态：</td>
						<td>
							<s:select list="#{'':'全部','0':'待发送','1':'成功','2':'失败'}"	 
							 name="emailDto.sendflag"
					  		 value="#request.emailDto.sendflag" 
					  		 id="replyFlag"
					  		 cssStyle="width:100px" >
							</s:select>
						</td>
						<td>
							<input type="submit" class="button" id="ok" name="ok" value="查 询" />
						</td>
					</tr>
				</table>
			</fieldset>
		</div>
			<!-- 查询结果 1 -->
			<table border="0" cellpadding="5" cellspacing="1" class="tb_datalist">
			 <tr align="center" height="28px" class="tr_title">
				<td>
					<b>消息时间</b>
				</td>
				<td>
					<b>收件人</b>
				</td>
				<td>
					<b>标题</b>
				</td>
				<td>
					<b>邮件地址</b>
				</td>
				<td>
					<b>状态</b>
				</td>
				<td>
					<b>发送日期</b>
				</td>
			</tr>
			<s:iterator id="sa" value="#request.list">
				<tr class="list_tr_item"
						onMouseOver="javascript:this.className='tr_selected';"
						onMouseOut="javascript:this.className='tr_even';">
					<td>
						<s:date name="#sa.createDate" format="yyyy-MM-dd HH:mm"/>	
					</td>
					<td>
						<s:property value="#sa.userId" />
					</td>
					<td>
						<s:property value="#sa.title" />
					</td>
					<td>
						<s:property value="#sa.email1" />	
					</td>
					<td align="center">
						<s:if test='"0"==#sa.sendflag'>
							待发送
						</s:if>
						<s:elseif test='"1"==#sa.sendflag'>
							成功
						</s:elseif>
						<s:elseif test='"2"==#sa.sendflag'>
							失败
						</s:elseif>
					</td>
					<td align="center">
						<s:date name="#sa.senddate" format="yyyy-MM-dd HH:mm"/>
					</td>
				</tr>
			</s:iterator>
		</table>
		<s:property value="#request.allowpage" escape="false" />
		</s:form>
	</body>
</html>
